package com.example.demo.core.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import com.mybatisflex.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ssk
 * @date 2025/6/12
 **/
@Getter
@AllArgsConstructor
//@JsonFormat(shape = JsonFormat.Shape.STRING)
public enum ChatTypeEnum /*implements IEnum<String>*/ {
    SINGLE("single"),
    GROUP("group"),
    PRIVATE_CHANNEL("private_channel"),
    PUBLIC_CHANNEL("public_channel");
    @EnumValue
    @JsonValue
    private final String value;


    public static ChatTypeEnum fromValue(String value) {
        return ChatTypeEnum.valueOf(value.toUpperCase());
    }

//    @Override
//    public String getValue() {
//        return value;
//    }

}
